package cn.wolfcode.trip.base.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;
@Getter
@Setter
public class DailyComment extends BaseDomain {
    //正常
    public static final int STATE_NORMAL = 0;
    //推介
    public static final int STATE_COMMEND = 1;
    //日报评论
    private String content;
    //关联用户
    private User user;
    //创建时间
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone ="GMT+8")
    private Date createTime;
    //关联日报
    private Daily daily;
    //状态
    private Integer state=STATE_NORMAL;

    public String getStateName(){
        String temp = "正常";
        if(state == STATE_COMMEND){
            temp = "推介";
        }
        return temp;
    }


}